import webapp2
import jinja2
import os

jinja_environment = jinja2.Environment(
    loader=jinja2.FileSystemLoader(os.path.dirname(__file__)))
  
class MainPage(webapp2.RequestHandler):
    def get(self):
        greeting = "Hello World ( with Jinja2 :)"
    
        template_values = {
            'greeting': greeting
        }
    
        template = jinja_environment.get_template('index.html')
        self.response.out.write(template.render(template_values))

app = webapp2.WSGIApplication([('/', MainPage)],
                              debug=True)